home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / gpt32src.zip / UNIXPLOT.TRM < prev    next >
Text File  |  1992-03-25  |  2KB  |  107 lines

  1. /*
  2.  * $Id: unixplot.trm,v 3.26 92/03/24 22:35:47 woo Exp Locker: woo $
  3.  */
  4.  
  5. /* GNUPLOT -- unixplot.trm */
  6. /*
  7.  * Copyright (C) 1990, 1991, 1992   
  8.  *
  9.  * Permission to use, copy, and distribute this software and its
  10.  * documentation for any purpose with or without fee is hereby granted, 
  11.  * provided that the above copyright notice appear in all copies and 
  12.  * that both that copyright notice and this permission notice appear 
  13.  * in supporting documentation.
  14.  *
  15.  * Permission to modify the software is granted, but not the right to
  16.  * distribute the modified code.  Modifications are to be distributed 
  17.  * as patches to released version.
  18.  *  
  19.  * This software  is provided "as is" without express or implied warranty.
  20.  * 
  21.  * This file is included by ../term.c.
  22.  *
  23.  * This terminal driver supports:
  24.  *  Unix plot(5) graphics language
  25.  *
  26.  * AUTHORS
  27.  *  Colin Kelley, Thomas Williams, Russell Lang
  28.  * 
  29.  * send your comments or suggestions to (info-gnuplot@ames.arc.nasa.gov).
  30.  * 
  31.  */
  32.  
  33. /*
  34. Unixplot library writes to stdout.  A fix was put in place by
  35. ..!arizona!naucse!jdc to let set term and set output redirect
  36. stdout.  All other terminals write to outfile.
  37. */
  38.  
  39. #define UP_XMAX 4096
  40. #define UP_YMAX 4096
  41.  
  42. #define UP_XLAST (UP_XMAX - 1)
  43. #define UP_YLAST (UP_YMAX - 1)
  44.  
  45. #define UP_VCHAR (UP_YMAX/30)    /* just a guess--no way to know this! */
  46. #define UP_HCHAR (UP_XMAX/60)    /* just a guess--no way to know this! */
  47. #define UP_VTIC (UP_YMAX/80)
  48. #define UP_HTIC (UP_XMAX/80)
  49.  
  50. UP_init()
  51. {
  52.     openpl();
  53.     space(0, 0, UP_XMAX, UP_YMAX);
  54. }
  55.  
  56.  
  57. UP_graphics()
  58. {
  59.     erase();
  60. }
  61.  
  62.  
  63. UP_text()
  64. {
  65. }
  66.  
  67.  
  68. UP_linetype(linetype)
  69. int linetype;
  70. {
  71. static char *lt[2+5] = {"solid", "longdashed", "solid", "dotted","shortdashed",
  72.     "dotdashed", "longdashed"};
  73.  
  74.     if (linetype >= 5)
  75.         linetype %= 5;
  76.     linemod(lt[linetype+2]);
  77. }
  78.  
  79.  
  80. UP_move(x,y)
  81. unsigned int x,y;
  82. {
  83.     move(x,y);
  84. }
  85.  
  86.  
  87. UP_vector(x,y)
  88. unsigned int x,y;
  89. {
  90.     cont(x,y);
  91. }
  92.  
  93.  
  94. UP_put_text(x,y,str)
  95. unsigned int x,y;
  96. char str[];
  97. {
  98.     UP_move(x+UP_HCHAR/2,y+UP_VCHAR/5);
  99.     label(str);
  100. }
  101.  
  102. UP_reset()
  103. {
  104.     closepl();
  105. }
  106.  
  107.